<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>商品列表</title>
   	<link rel="stylesheet" type="text/css" href="__STATIC__/hdjs/hdjs.css"/>
</head>
<body>
<div class="wrap">
	<form action="" method="post">
		    <table class="hd-table hd-table-list">
        <thead>
        <tr>
            <td width="50">id</td>
        			<?php foreach($attrgroup as $v): ?>
        				<td>
        						<?php echo $v[0]['propertyname']; ?>
        				</td>
        			<?php endforeach ?>
            <td width="180">库存</td>
            <td width="180">货号</td>
            <td width="150">操作</td>
        </tr>
        </thead>
        <tbody>
        	    <!--货品列表-->
        		<?php foreach($shopData as $v): ?>
	        	<tr>
	            <td width="50"><?php echo $v['id'] ?></td>
	            <?php foreach($v['sumattr'] as $value): ?>
	            		<td><?php echo $value ?></td>
	            <?php endforeach ?>
	            <td width="180"><?php echo $v['kucun'] ?></td>
	            <td width="180"><?php echo $v['itemnumber'] ?></td>
	            <td width="150">
					<a href="{|U:'edit',array('id'=>$v['id'],'gid'=>$v['goods_gid'])}">修改</a>
					<a href="{|U:'del',array('id'=>$v['id'],'gid'=>$v['goods_gid'])}">删除</a>
	            </td>
	            </tr>
        		<?php endforeach ?>
        			<!--添加货品-->
        		<tr>
        			<td>添加货品</td>
        			<?php foreach($attrgroup as $v): ?>
        				<td>
        					<select  name="gsid[]">
        						<option value="0">请选择</option>
        						<?php foreach($v as $value): ?>
        						<option value="{$value.gsid}">{$value.gavalue}</option>
        						<?php endforeach ?>
        					</select>
        				</td>
        			<?php endforeach ?>
        			<td>
        				<input type="text" name="kucun" id="" />
        			</td>
        			<td>
        				<input type="text" name="itemnumber" id="" />
        			</td>
        			<td>
        				<input type="submit" value="添加" />
        			</td>
        		</tr>
        </tbody>
    </table>
	</form>

    <div class="page_hdjob">
      
    </div>
</div>

</body>
</html>


